<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Restoring an SAP HANA Database">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="en-us_topic_0000001839268577.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
<meta name="DC.Publisher" content="20240608">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000001792389520">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Restoring an SAP HANA Database</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000001792389520"></a><a name="EN-US_TOPIC_0000001792389520"></a>

<h1 class="topictitle1">Restoring an SAP HANA Database</h1>
<div><p>This section describes how to restore a database that has been backed up to the original location.</p>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Before restoring a tenant database, you must shut down the target database. Skip this step when restoring a system database.</span><p><div class="p">Ensure that no system database is being restored in the cluster where the target database resides.<ol type="a"><li>Use PuTTY to log in to the SAP HANA database host.</li><li>Run the following command to switch to the system user:<pre class="screen"><strong>su - </strong><em>System ID</em><strong>adm</strong></pre>
<p>Example:</p>
<pre class="screen">su - k00adm</pre>
</li><li>Run the following command to log in to the system database:<pre class="screen"><strong>hdbsql -i </strong><em>Instance ID</em><strong> -n </strong><em>Host name of the system master database node</em><strong>:</strong><em>SQL Port of the system database</em><strong> -d SYSTEMDB -u </strong><em>Username of the system database</em><strong> -p </strong><em>Password of the system database</em></pre>
<p>Example:</p>
<pre class="screen">hdbsql -i 00 -n localhost:30013 -d SYSTEMDB -u SYSTEM -p xxxxxxx</pre>
</li><li>Run the following command to shut down the target database:<pre class="screen"><strong>alter system stop database </strong><em>Name of the target database</em>;</pre>
</li></ol>
</div>
</p></li><li><span>Choose <span class="uicontrol" id="EN-US_TOPIC_0000001792389520__en-us_topic_0000001792389528_en-us_topic_0000001839142377_uicontrol01751955491"><b><span id="EN-US_TOPIC_0000001792389520__en-us_topic_0000001792389528_en-us_topic_0000001839142377_text717565144913"><strong>Explore</strong></span> &gt; <span id="EN-US_TOPIC_0000001792389520__en-us_topic_0000001792389528_en-us_topic_0000001839142377_text217518584917"><strong>Copy Data</strong></span> &gt; <span id="EN-US_TOPIC_0000001792389520__en-us_topic_0000001792389528_en-us_topic_0000001839142377_text11107161017483"><strong>Databases</strong></span> &gt; General Databases</b></span>.</span></li><li><span>Search for copies by database or copy. This section describes how to search for copies by database.</span><p><p>On the <strong>Resources</strong> tab page, locate the database to be restored by database name and then click the name.</p>
</p></li><li><span>Click <span class="uicontrol"><b><span><strong>Copy Data</strong></span></b></span> and select the year, month, and day in sequence to locate the copy.</span><p><p>If <span><img src="en-us_image_0000001792549384.png"></span> is displayed below a month or day, copies exist in the month or on the day.</p>
</p></li><li><span>Restore data to a specified point in time or using a specific copy.</span><p><ol type="a"><li>Perform restoration by specifying a copy or a time point between two copies.<ul><li>Specifying a copy for restoration<p><span><img class="eddx" src="en-us_image_0000001792549368.png"></span></p>
</li><li>Restoring data to a specified point in time<p><span><img class="eddx" src="en-us_image_0000001839188753.png"></span></p>
<p>Data can be restored to the specific time point in the blue part on the timeline. <span><img src="en-us_image_0000001839188737.png"></span> indicates that a copy exists at the time point. If no logs are backed up at a time point, data cannot be restored to the time point.</p>
</li></ul>
</li></ol><ol type="a" start="2"><li>Restore an SAP HANA database to the original location.<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p>System database restoration will cause tenant database information contained in the restoration copy to be synchronized. As a result, some tenant databases may fail to be accessed.</p>
</div></div>
<div class="p"><ol class="substepthirdol"><li>Select <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span> for restoring the VM.</li><li>Click <span class="uicontrol"><b><span><strong>OK</strong></span></b></span>.</li></ol>
</div>

</li></ol>
</p></li><li><span>Click <span class="uicontrol"><b><span><strong>OK</strong></span></b></span>.</span></li><li><span>If the database is restored to another cluster, you must import the SAP HANA database license at the target cluster after the restoration job is complete. Otherwise, the restored database cannot be used. You need to obtain the license of the SAP HANA database in the target cluster, and then perform the following steps to import the license. Skip this step when restoring the database to the original cluster.</span><p><ol type="a"><li>Use PuTTY to log in to the SAP HANA database host after restoration.</li><li>Run the following command to switch to the system user:<pre class="screen"><strong>su - </strong><em>System ID</em><strong>adm</strong></pre>
<p>Example:</p>
<pre class="screen">su - k00adm</pre>
</li><li>Run the following command to log in to the system database:<pre class="screen"><strong>hdbsql -i </strong><em>Instance ID</em><strong> -n </strong><em>Host name of the system master database node</em><strong>:</strong><em>SQL Port of the system database</em><strong> -d SYSTEMDB -u </strong><em>Username of the system database</em><strong> -p </strong><em>Password of the system database</em></pre>
<p>Example:</p>
<pre class="screen">hdbsql -i 00 -n localhost:30013 -d SYSTEMDB -u SYSTEM -p xxxxxxx</pre>
</li><li>Run the following command to import the license file:<pre class="screen">SET SYSTEM LICENSE
'<em>Content of the license file</em>
';</pre>
<div class="p">Example:<pre class="screen">SET SYSTEM LICENSE
'----- Begin SAP License -----
SAPSYSTEM=HD1
HARDWARE-KEY=K4150485960
INSTNO=0110008649
BEGIN=20110809
EXPIRATION=20151231
LKEY=...
SWPRODUCTNAME=SAP-HANA
SWPRODUCTLIMIT=2147483647
SYSTEM-NR=00000000031047460';</pre>
</div>
</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000001839268577.html">Restoration</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>